import { Injectable } from "@nestjs/common";
import { User } from "./interfaces/user.interface";
import { CreateUserDto } from "./dto/create-user.dto";

// service模块主要用于处理数据层的逻辑

@Injectable()
export class UsersService {
  constructor(

  ) {}

  async create(createUserDto: CreateUserDto): Promise<User> {
    return {
      id: 1,
      email: 'test@test.com',
      name: 'test',
      password: '123456',
    }
  }

  async findAll(): Promise<User[]> {
    return [
      {
        id: 1,
        email: 'test@test.com',
        name: 'test',
        password: '123456',
      }
    ]
  }
}